import request from '@/utils/request/request';
// 分页查询三码验证数据
export function getPmsDcdSNPage(params: any) {
  return request.get('/api/procurement/order/dcd-sn-mian/page', {
    params,
  });
}
// 新增三码验证到货API
export function savePmsDcdProdDetail(data: any) {
  return request.post('/api/procurement/order/receive-detail', data);
}

// 修改三码验证API
export function editPmsDcdProdDetail(data: any) {
  return request.put('/api/procurement/order/receive-detail', data);
}

// 根据三码验证APIid查API详细信息
export function getPmsDcdProdDetailDetailInfoById(id: string) {
  return request.get(`/api/procurement/order/receive-detail/${id}`);
}

// 删除三码验证API
export function deletePmsDcdProdDetail(id: string) {
  return request.delete(`/api/procurement/order/receive-detail/${id}`);
}
// 分页查询机载物品码详情API数据
export function getPmsDcdItemDetailPage(params: any) {
  return request.get('/api/procurement/order/dcd-item/dcdItemDetail', {
    params,
  });
}
// 获取串口配置
export function getPmsSerialConfig(params: any) {
  return request.get('/api/procurement/order/serial-assist-config/detail', {
    params,
  });
}
// 保存串口配置
export function savePmsSerialConfig(data: any) {
  return request.post('/api/procurement/order/serial-assist-config', data);
}
// 三码验证物资批次明细
export function getPmsDcdPageDetail(params: any) {
  return request.get(
    '/api/procurement/order/dcd-sn-mian/pageDcdReceiveDetailBatch',
    {
      params,
    }
  );
}
// 三码验证到货明细
export function getPmsDcdPage(params: any) {
  return request.get(
    '/api/procurement/order/dcd-sn-mian/pageDcdReceiveDetail',
    {
      params,
    }
  );
}
// 绑定预到货
export function bindPmsDetailAndBatch(data: any) {
  return request.post('/api/procurement/order/dcd-sn-mian/bind', data);
}
// 删除三码信息
export function deletePmsBatch(data: any) {
  return request.post(
    '/api/procurement/order/dcd-sn-mian/deleteReceivedetailBatch',
    data
  );
}
// 撤销三码信息

export function revokePmsBatch(data: any) {
  return request.post('/api/procurement/order/dcd-sn-mian/revoke', data);
}
// 更新dcd信息
export function updateDetailDcd(data: any) {
  return request.post(
    '/api/procurement/order/dcd-sn-mian/updateDetailDcd',
    data
  );
}
export function saveThreeCode(data: any) {
  return request.post(
    '/api/procurement/order/dcd-sn-mian/threeCodeVerification',
    data
  );
}
